#pragma once
#include <vector>
#include <functional>
#include <string.h>
#include <unistd.h>
#include <VK_Context.h>

class Node
{
public:
    enum NodeType {
        NodeType_Generic = 0,
        NodeType_FillRate,
        NodeTypeMax
    };

    static std::string getNodeTypeStringByType(NodeType type);
    const int MIN_WEIGHT = 1;
    const int MAX_WEIGHT = 20;

    static constexpr double totalTime = 20.0;
public:
    Node();
    Node(const Node &) = delete;
    Node &operator = (const Node &) = delete;
    virtual ~Node() = default;
public:
    virtual NodeType getNodeType();

    void setWeightValue(int weight);
    int  getWeightValue();
public:
    virtual RunningState run() = 0;

    void setAverageFps(double fps);
    double getAverageFps()const;

    std::string getNodeName()const;
    std::string getNodeTitle();

    virtual bool checkDevice(const VkPhysicalDeviceFeatures &feature);
protected:
    std::string nodeName;
    float averageFps;
    int weightValue = 10;
};
